import axios from '../utils/axios'

export function getCompanyById(id) {
  return axios.get(`/recruit/hr-company/${id}`);
}
export function getCompanyByName(name) {
  return axios.get(`/recruit/company/search?name=${name}`)
}

export function updateEnter(id, data) {
  return axios.put(`recruit/company/${id}`, data);
}
export function updateState(id, state) {
  return axios.put(`recruit/company/state/${id}?state=${state}`);
}

export function addCompany(params) {
  return axios.post('/recruit/company', params);
}
export function addHrCompany(hrID, companyID) {
  return axios.post(`recruit/hr-company/?hrID=${hrID}&companyID=${companyID}`);
}